<template>
  <div id="zonghe-details">
    <div class="all-tab">
      <div
        v-for="(item, index) in labels"
        :key="index"
        :class="{active: active === index}"
        @click="handleNavItemClick(index)"
      >
        {{ item.bookName }}
      </div>
    </div>
    <div class="details-title">
      <div class="title-left">
        <div>
          <img
            src="@/assets/img/login/left-1.png"
            alt=""
          >
          AI智能分析
        </div>
        <div class="gray">数据统计截至 2025.1.12 10:09</div>
        <div>
          <el-icon class="is-loading">
            <Loading />
          </el-icon>
          正在更新
        </div>
      </div>
      <div
        class="all-btn"
        @click="goBack()"
      >
        <el-icon>
          <ArrowLeft />
        </el-icon>
        <span>返回</span>
      </div>
    </div>
    <div class="details-main">
      <div class="step-one">
        <div class="one-left"></div>
        <div class="one-right">
          <div class="righta">
            <div>
              <div class="right-title">图像理解分析师达成度</div>
              <div class="right-txt">
                达成度统计名称
                <img
                  class="img2"
                  src="@/assets/img/login/left-1.png"
                >

              </div>
            </div>
            <div>
              <img
                class="img1"
                src="@/assets/img/login/left-1.png"
              >
            </div>
          </div>
          <div class="rightb">
            <div>
              <div class="right-title">71.7/80</div>
              <div class="right-txt">
                成绩/达成度阈值
                <img
                  class="img2"
                  src="@/assets/img/login/left-1.png"
                >

              </div>
            </div>
            <div>
              <img
                class="img1"
                src="@/assets/img/login/left-1.png"
              >
            </div>
          </div>
          <div class="rightc">
            <div>
              <div class="right-title">白雪老师</div>
              <div class="right-txt">
                负责人
                <img
                  class="img2"
                  src="@/assets/img/login/left-1.png"
                >

              </div>
            </div>
            <div>
              <img
                class="img1"
                src="@/assets/img/login/left-1.png"
              >
            </div>
          </div>
          <div class="rightd">
            <div>
              <div class="right-title">50</div>
              <div class="right-txt">
                学生人数
                <img
                  class="img2"
                  src="@/assets/img/login/left-1.png"
                >

              </div>
            </div>
            <div>
              <img
                class="img1"
                src="@/assets/img/login/left-1.png"
              >
            </div>
          </div>
        </div>
      </div>
      <div class="step-two">
        <div class="sub-title">
          <div>课程目标详情</div>
          <div class="sub-title-btn">
            <el-icon>
              <Setting />
            </el-icon>
            课程目标设置
          </div>
        </div>
        <div class="two-list">
          <div>
            <div class="item-a">
              <img src="@/assets/img/login/left-1.png">
            </div>
            <div class="item-b">
              <div class="b-title">
                <div class="b-txt">课程目标01</div>
                <div class="b-qz">权重值：40</div>
                <div class="b-dc">
                  <el-icon>
                    <StarFilled />
                  </el-icon>
                  未达成
                </div>
                <div class="b-dc b-active">
                  <el-icon>
                    <StarFilled />
                  </el-icon>
                  已达成
                </div>
              </div>
              <div class="b-content">
                技术应用能力：熟练掌握并运用专业技术的能力。在工作中，能依据项目需求，精准选择合适技术工具与平台，高效完成任务，提升工作效率和质量，推动项目顺利进展，紧跟技术发展前沿，不断学习新技术以适应行业变化，为企业创新与进步提供有力支撑。
              </div>
            </div>
            <div class="item-c">
              <div class="c-num">32</div>
              <div class="c-txt">期望分值</div>
            </div>
            <div class="item-d">
              <div class="d-num">26</div>
              <div class="d-txt">成绩</div>
            </div>
          </div>
          <div>
            <div class="item-a">
              <img src="@/assets/img/login/left-1.png">
            </div>
            <div class="item-b">
              <div class="b-title">
                <div class="b-txt">课程目标01</div>
                <div class="b-qz">权重值：40</div>
                <div class="b-dc">
                  <el-icon>
                    <StarFilled />
                  </el-icon>
                  未达成
                </div>
                <div class="b-dc b-active">
                  <el-icon>
                    <StarFilled />
                  </el-icon>
                  已达成
                </div>
              </div>
              <div class="b-content">
                技术应用能力：熟练掌握并运用专业技术的能力。在工作中，能依据项目需求，精准选择合适技术工具与平台，高效完成任务，提升工作效率和质量，推动项目顺利进展，紧跟技术发展前沿，不断学习新技术以适应行业变化，为企业创新与进步提供有力支撑。
              </div>
            </div>
            <div class="item-c">
              <div class="c-num">32</div>
              <div class="c-txt">期望分值</div>
            </div>
            <div class="item-d">
              <div class="d-num">26</div>
              <div class="d-txt">成绩</div>
            </div>
          </div>
        </div>
      </div>
      <div class="step-three">
        <div class="sub-title">
          <div>达成度统计表</div>
          <div class="sub-title-btns">
            <div class="sub-title-btn">
              <el-icon>
                <Setting />
              </el-icon>
              达成度设置
            </div>
            <div class="sub-title-btn">
              <el-icon>
                <Download />
              </el-icon>
              整体数据
            </div>
          </div>
        </div>
        <div class="three-wrap">
          <div class="three-title">
            <div class="title-left">
              <div class="title-txt">考核项：学业综合评估体系</div>
              <div class="title-btn">
                <el-icon>
                  <Upload />
                </el-icon>
                导入数据
              </div>
              <div class="title-btn">
                <el-icon>
                  <Document />
                </el-icon>
                查看公式
              </div>
            </div>
            <div class="title-right">
              <div class="right-a">满分：<span class="blue">100分</span></div>
              <div class="right-b">成绩：<span class="blue">71.7分</span></div>
            </div>
          </div>
          <div class="three-content">
            <el-table
              class="my-table"
              :data="tableData"
              style="width: 100%"
            >
              <el-table-column
                prop="address"
                label="Address"
              />
              <el-table-column
                prop="address"
                label="Address"
              />
              <el-table-column
                prop="address"
                label="Address"
              />
              <el-table-column
                prop="address"
                label="Address"
              />
              <el-table-column
                prop="address"
                label="Address"
              >
                <template #default="{ row }">
                  <el-icon class="green">
                    <CircleCheckFilled />
                  </el-icon>
                </template>
              </el-table-column>
              <el-table-column
                prop="address"
                label="Address"
              >
                <template #default="{ row }">
                  <el-icon class="red">
                    <WarningFilled />
                  </el-icon>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <div class="three-wrap three-wrap2">
          <div class="three-title three-title2">
            <div class="title-left">
              <div class="title-txt">总评成绩/课程目标达成度</div>
            </div>
            <div class="title-right">
              <div class="right-a">满分：<span class="blue">100分</span></div>
              <div class="right-b">成绩：<span class="blue">71.7分</span></div>
            </div>
          </div>
          <div class="three-content three-content2">
            <el-table
              class="my-table"
              :data="tableData"
              style="width: 100%"
            >
              <el-table-column
                prop="address"
                label="Address"
              />
              <el-table-column
                prop="address"
                label="Address"
              />
              <el-table-column
                prop="address"
                label="Address"
              />
              <el-table-column
                prop="address"
                label="Address"
              />
              <el-table-column
                prop="address"
                label="Address"
              >
                <template #default="{ row }">
                  <el-icon class="green">
                    <CircleCheckFilled />
                  </el-icon>
                </template>
              </el-table-column>
              <el-table-column
                prop="address"
                label="Address"
              >
                <template #default="{ row }">
                  <el-icon class="red">
                    <WarningFilled />
                  </el-icon>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
      </div>
      <div class="step-four">
        <div class="sub-title">
          课程目标达成度分析图
        </div>
        <div class="four-content">
          <div class="four-a">
            <div class="four-aleft"></div>
            <div class="four-aright"></div>
          </div>
          <div class="four-b">
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
  
  <script>
export default {
  components: {},
  data() {
    return {
      labels: [],
      active: 0,
      tableData: [
        {
          date: "2016-05-03",
          name: "Tom",
          address: "No. 189, Grove St, Los Angeles",
        },
        {
          date: "2016-05-02",
          name: "Tom",
          address: "No. 189, Grove St, Los Angeles",
        },
        {
          date: "2016-05-04",
          name: "Tom",
          address: "No. 189, Grove St, Los Angeles",
        },
        {
          date: "2016-05-01",
          name: "Tom",
          address: "No. 189, Grove St, Los Angeles",
        },
      ],
    };
  },
  created() {
    this.getLabel();
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    },
    getLabel() {
      const url = "/dify/getBookInfo";
      this.$axios.get(url).then((response) => {
        const res = response;
        if (res.code === 200) {
          console.log(res.data, 2);
          this.labels = res.data;
        }
      });
    },
    handleNavItemClick(index) {
      this.active = index;
      this.$router.push(this.teaNavList[index].url);
    },
  },
};
</script>
<style lang="scss" scoped>
#zonghe-details {
  .details-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    .title-left {
      display: flex;
      gap: 26px;
      align-items: center;
      > div {
        display: flex;
        align-items: center;
        color: #3761ac;
        gap: 8px;
        &.gray {
          color: #939393;
        }
        img {
          width: 30px;
        }
      }
    }
  }
  .sub-title-btns {
    display: flex;
    gap: 40px;
  }
  .sub-title {
    display: flex;
    justify-content: space-between;
    border-left: 3px solid #385899;
    padding: 0 0 0 20px;
    margin-bottom: 20px;
    .sub-title-btn {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 14px;
      color: #385899;
      cursor: pointer;
      &:hover {
        color: #3761ac;
      }
    }
  }
  .details-main {
    display: flex;
    flex-direction: column;
    gap: 55px;
    .step-one {
      display: flex;
      justify-content: space-between;
      gap: 20px;
      > div {
        width: 50%;
        height: 240px;
        &.one-left {
          background: #ffffff;
          box-shadow: 0px 0px 7px 0px rgba(70, 123, 235, 0.13);
          border-radius: 10px;
          border: 1px solid #ffffff;
        }
        &.one-right {
          display: flex;
          flex-wrap: wrap;
          box-sizing: border-box;
          gap: 20px;
          color: #fff;
          > div {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: calc(50% - 10px);
            height: calc(50% - 10px);
            padding: 0 24px;
            box-sizing: border-box;
            .img1 {
              width: 40px;
            }
            .img2 {
              width: 16px;
            }
            .right-title {
              font-weight: bold;
              font-size: 18px;
              margin-bottom: 10px;
            }
            .right-txt {
              display: flex;
              align-items: center;
              gap: 10px;
            }
            &.righta {
              background: linear-gradient(90deg, #4c93ff, #1dbaf0);
              box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
              border-radius: 5px;
            }
            &.rightb {
              background: linear-gradient(90deg, #ff908a, #ff6c88);
              box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
              border-radius: 5px;
            }
            &.rightc {
              background: linear-gradient(90deg, #10bdd8, #37cdc0);
              box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
              border-radius: 5px;
            }
            &.rightd {
              background: linear-gradient(90deg, #6186ff, #8b49e8);
              box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
              border-radius: 5px;
            }
          }
        }
      }
    }
    .step-two {
      .two-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        > div {
          display: flex;
          align-items: center;
          height: 170px;
          background: #ffffff;
          box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
          border-radius: 4px;
          padding: 30px 60px;
          box-sizing: border-box;
          .item-a {
            min-width: 160px;
          }
          .item-b {
            flex: 1;
            .b-title {
              display: flex;
              align-items: center;
              gap: 24px;
              margin-bottom: 14px;
              .b-txt {
                font-weight: bold;
                font-size: 18px;
                color: #457aff;
              }
              .b-qz {
                font-size: 14px;
                color: #5181e3;
                background: #e9f3ff;
                border-radius: 12px;
                padding: 6px 10px;
              }
              .b-dc {
                display: flex;
                align-items: center;
                gap: 2px;
                font-size: 14px;
                color: #e2d0a8;
                background: #f9f5eb;
                border-radius: 12px;
                padding: 6px 10px;
                i {
                  font-size: 18px;
                }
                &.b-active {
                  color: #f8b92e;
                  background: #fdf2d8;
                }
              }
            }
            .b-content {
              font-size: 14px;
              color: #818c9a;
              line-height: 24px;
            }
          }
          .item-c {
            padding: 0 40px;
            text-align: center;
            border-right: 1px solid #e9e9e9;
            .c-num {
              font-family: Impact;
              font-weight: 400;
              font-size: 36px;
              color: #457aff;
            }
            .c-txt {
              font-size: 16px;
              color: #3a3a3a;
            }
          }
          .item-d {
            padding: 0 40px;
            text-align: center;
            .d-num {
              font-family: Impact;
              font-weight: 400;
              font-size: 36px;
              color: #457aff;
            }
            .d-txt {
              font-size: 16px;
              color: #3a3a3a;
            }
          }
        }
      }
    }
    .step-three {
      .three-wrap {
        background: #ffffff;
        box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
        border-radius: 5px;
        padding: 43px 26px;
        margin-bottom: 20px;
        &.three-wrap2 {
          margin-bottom: 0;
        }
        .three-title {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 10px;
          .title-left {
            display: flex;
            align-items: center;
            gap: 30px;
            .title-txt {
              font-weight: bold;
              font-size: 20px;
              color: #5a72cd;
            }
            .title-btn {
              display: flex;
              align-items: center;
              gap: 4px;
              color: #385899;
              cursor: pointer;
              &:hover {
                color: #3761ac;
              }
            }
          }
          .title-right {
            display: flex;
            align-items: center;
            gap: 53px;
            .right-a,
            .right-b {
              position: relative;
              font-size: 16px;
              color: #474747;
              .blue {
                color: #457aff;
                font-size: 18px;
                font-weight: bold;
              }
              &::before {
                content: "";
                position: absolute;
                top: 9px;
                left: -10px;
                width: 4px;
                height: 12px;
                background: #1277eb;
              }
            }
          }
        }
        .three-content {
          .my-table {
            :deep(table) {
              th,
              td {
                padding: 2px;
                text-align: center;
                border: 0;
              }
              th {
                font-weight: bold;
                font-size: 16px;
                color: #ffffff;
                .cell {
                  height: 71px;
                  line-height: 71px;
                  background: #a6b4ec;
                  margin-bottom: 4px;
                }
              }
              td {
                .cell {
                  height: 44px;
                  line-height: 44px;
                  background: #f6f9ff;
                  .green {
                    font-size: 20px;
                    color: #48c978;
                  }
                  .red {
                    font-size: 20px;
                    color: #ff6666;
                  }
                }
              }
            }
          }
        }

        .three-title2 {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 10px;
          .title-left {
            display: flex;
            align-items: center;
            gap: 30px;
            .title-txt {
              font-weight: bold;
              font-size: 20px;
              color: #1277eb;
            }
            .title-btn {
              display: flex;
              align-items: center;
              gap: 4px;
              color: #385899;
              cursor: pointer;
              &:hover {
                color: #3761ac;
              }
            }
          }
          .title-right {
            display: flex;
            align-items: center;
            gap: 53px;
            .right-a,
            .right-b {
              position: relative;
              font-size: 16px;
              color: #474747;
              .blue {
                color: #457aff;
                font-size: 18px;
                font-weight: bold;
              }
              &::before {
                content: "";
                position: absolute;
                top: 9px;
                left: -10px;
                width: 4px;
                height: 12px;
                background: #1277eb;
              }
            }
          }
        }
        .three-content2 {
          .my-table {
            :deep(table) {
              th,
              td {
                padding: 2px;
                text-align: center;
                border: 0;
              }
              th {
                font-weight: bold;
                font-size: 16px;
                color: #ffffff;
                .cell {
                  height: 71px;
                  line-height: 71px;
                  background: #89beeb;
                  margin-bottom: 4px;
                }
              }
              td {
                .cell {
                  height: 44px;
                  line-height: 44px;
                  background: #eff4ff;
                  .green {
                    font-size: 20px;
                    color: #48c978;
                  }
                  .red {
                    font-size: 20px;
                    color: #ff6666;
                  }
                }
              }
            }
          }
        }
      }
    }
    .step-four {
      .four-content {
        .four-a {
          display: flex;
          gap: 20px;
          margin-bottom: 20px;
          .four-aleft {
            width: 60%;
            height: 360px;
            background: #ffffff;
            box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
            border-radius: 5px;
          }
          .four-aright {
            width: 40%;
            height: 360px;
            background: #ffffff;
            box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
            border-radius: 5px;
          }
        }
        .four-b {
          height: 360px;
          background: #ffffff;
          box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
          border-radius: 5px;
        }
      }
    }
  }
}
</style>